package mysql

import "github.com/jinzhu/gorm"

// My SQL
type MySQL struct {
	args interface{}
}

// New will init a struct
func New(args interface{}) MySQL {
	return MySQL{args: args}
}

// Open will build a connection with database
func (m MySQL) Open() (*gorm.DB, error) {
	return gorm.Open("mysql", m.args)
}

// Args will return the connection args
func (m MySQL) Args() interface{} {
	return m.args
}
